let print_bool b = print_string (string_of_bool b);;

print_string "compare 42 8 = ";;
print_int (compare 42 8);;
print_newline ();;

print_string "compare 8 42 = ";;
print_int (compare 8 42);;
print_newline ();;

print_string "compare 42 42 = ";;
print_int (compare 42 42);;
print_newline ();;

print_string "compare \"hello\" \"world\" = ";;
print_int (compare "hello" "world");;
print_newline ();;

print_string "compare 3.14 1.414 = ";;
print_int (compare 3.14 1.414);;
print_newline ();;

print_string "compare 1.414 3.14 = ";;
print_int (compare 1.414 3.14);;
print_newline ();;

print_string "compare 3.14 3.14 = ";;
print_int (compare 3.14 3.14);;
print_newline ();;

print_string "compare nan 3.14 = ";;
print_int (compare nan 3.14);;
print_newline ();;

print_string "compare 3.14 nan = ";;
print_int (compare 3.14 nan);;
print_newline ();;

print_string "compare nan nan = ";;
print_int (compare nan nan);;
print_newline ();;

print_string "nan < 3.14 = ";;
print_bool (nan < 3.14);;
print_newline ();;

print_string "nan > 3.14 = ";;
print_bool (nan > 3.14);;
print_newline ();;

print_string "nan <= 3.14 = ";;
print_bool (nan <= 3.14);;
print_newline ();;

print_string "nan >= 3.14 = ";;
print_bool (nan >= 3.14);;
print_newline ();;

print_string "nan = 3.14 = ";;
print_bool (nan = 3.14);;
print_newline ();;

print_string "3.14 < nan = ";;
print_bool (3.14 < nan);;
print_newline ();;

print_string "3.14 > nan = ";;
print_bool (3.14 > nan);;
print_newline ();;

print_string "3.14 <= nan = ";;
print_bool (3.14 <= nan);;
print_newline ();;

print_string "3.14 >= nan = ";;
print_bool (3.14 >= nan);;
print_newline ();;

print_string "3.14 = nan = ";;
print_bool (3.14 = nan);;
print_newline ();;

print_string "nan = nan = ";;
print_bool (nan = nan);;
print_newline ();;

print_string "compare [| 1.1 ; 3.14 ; 1.0 |] [| 1.1 ; 3.1 ; 1.0 |] = ";;
print_int (compare [| 1.1 ; 3.14 ; 1.0 |] [| 1.1 ; 3.1 ; 1.0 |]);;
print_newline ();;

print_string "compare [| 1 ; 2 ; 3 ; 4 |] [| 1 ; 3 ; 2 |] = ";;
print_int (compare [| 1 ; 2 ; 3 ; 4 |] [| 1 ; 3 ; 2 |]);;
print_newline ();;

print_string "compare [ 1 ; 2 ; 3 ; 4 ] [ 1 ; 3 ; 2 ] = ";;
print_int (compare [ 1 ; 2 ; 3 ; 4 ] [ 1 ; 3 ; 2 ]);;
print_newline ();;

print_string "compare [| \"\" ; \"avv\" |] [| \"\" ; \"cdef\" |] = ";;
print_int (compare [| "" ; "xvv" |] [| "" ; "cdef" |]);;
print_newline ();;

print_string "18 == 18 = ";;
print_bool (18 == 18);;
print_newline ();;

print_string "let x = [ 1 ; 2 ] in let y = List.tl (1 :: x) in x == y = ";;
print_bool (let x = [ 1 ; 2 ] in let y = List.tl (1 :: x) in x == y);;
print_newline ();;
